/*
 * copyright (c) 2009 Alexandr [Sn@ble] Surnin
 *
 * This file is part of FrameSeeker.
 *
 * FrameSeeker is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FrameSeeker is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You can read the full version of GNU LGPL in
 * http://www.gnu.org/copyleft/lesser.html
 */


#include "FSMotionVector.h"

FSMotionVector::FSMotionVector(const int mb_x, const int mb_y,
                               const int mv_x, const int mv_y) {

    mb.setX( mb_x );
    mb.setY( mb_y );
    mv.setX( mv_x );
    mv.setY( mv_y );
}


FSMotionVector::FSMotionVector(const QPoint &_mb, const QPoint &_mv) {

    mb = _mb;
    mv = _mv;
}


QPoint FSMotionVector::getMB() const {

    return mb;
}


void FSMotionVector::setMB(const QPoint &_mb) {

    mb = _mb;
}


QPoint FSMotionVector::getMV() const {

    return mv;
}


void FSMotionVector::setMV(const QPoint &_mv) {

    mv = _mv;
}


FSMotionVector::~FSMotionVector() {

}


FSMotionVector::FSMotionVector(const FSMotionVector &orig) :  QObject() {

    mb = orig.getMB();
    mv = orig.getMV();
}


FSMotionVector& FSMotionVector::operator=(const FSMotionVector &right) {

    FSMotionVector *result = new FSMotionVector(right.getMB().x(), right.getMB().y(),
                                                right.getMV().x(), right.getMV().y());
    return *result;
}
